package jdmx.library.da;

import jdmx.library.info.DbInfo;


public class DatabaseFactory {
	public static Database createInstance(DbInfo dbInfo) {
		Database db = null;
		
		if (dbInfo.dbmsType.equalsIgnoreCase("MySql")) {
			db = new DatabaseMySql();
		} else if (dbInfo.dbmsType.equalsIgnoreCase("MsAccess")) {
			db = new DatabaseMsAccess();
		}

		db.init(dbInfo);
		return db;
	}
}
